# $Id$
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Kevin Piche <kevin@archlinux.org>

pkgname=perl-net-ip
_realname=Net-IP
pkgver=1.26
pkgrel=4
pkgdesc="Perl Module:  Easy manipulation of IPv4 and IPv6 addresses"
arch=('any')
license=('PerlArtistic')
url="http://search.cpan.org/dist/${_realname}/"
depends=('perl')
options=(!emptydirs)
source=(http://www.cpan.org/authors/id/M/MA/MANU/${_realname}-${pkgver}.tar.gz)
md5sums=('3a98e3ac45d69ea38a63a7e678bd716d')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
